package com.alex.dao;

import com.alex.pojo.Student;
import com.alex.pojo.Teacher;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface TeacherMapper {
    @Select("select * from teacher where id=#{id}")
    Teacher getTeacher(int id);

    @Select("select * from teacher")
    List<Teacher> getTeachers();

    Teacher getTeacher1(@Param("tid") int id);

    Teacher getTeacher2(@Param("tid") int id);

    List<Teacher> getTeachers1();

    List<Teacher> getTeachers2();

    Student getStudent(@Param("sid") int id);

    List<Student> getStudents(@Param("tid") int tid);
}
